import request from '@/utils/request'


export function ClasseslistByTeacherAPI() {
  return request({
    url: '/classes/listByTeacher',
  })
}

export function getAllClassesByPageAPI(params) {
  return request({
    url: '/classes/getAllClassesByPage',
    params
  })
}
export function exportExcelAPI(params) {
  return request({
    url: '/classes/exportExcel',
    method: 'GET',
    responseType: 'blob', 
    params
  });
}

export function getAllClassesAPI() {
  return request({
    url: '/classes/getAllClasses',
  })
}

export function addOrEditClassAPI(classes) {
  return request({
    url: '/classes/addOrEditClass',
    method: 'post',
    data: classes
  })
}

export function deleteClassAPI(classId){
  return request({
    url:`/classes/deleteClass/${classId}`,
    method: 'delete'
  })
}

